home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  3.7 KB  |  176 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ConnectionTools.h
  3.  
  4.      Contains:    Communications Toolbox Connection Tools Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1988-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CONNECTIONTOOLS__
  19. #define __CONNECTIONTOOLS__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24. #ifndef __DIALOGS__
  25. #include <Dialogs.h>
  26. #endif
  27. #ifndef __CONNECTIONS__
  28. #include <Connections.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.                                                                 /* messages for DefProc */
  56.     cmInitMsg                    = 0,
  57.     cmDisposeMsg                = 1,
  58.     cmSuspendMsg                = 2,
  59.     cmResumeMsg                    = 3,
  60.     cmMenuMsg                    = 4,
  61.     cmEventMsg                    = 5,
  62.     cmActivateMsg                = 6,
  63.     cmDeactivateMsg                = 7,
  64.     cmIdleMsg                    = 50,
  65.     cmResetMsg                    = 51,
  66.     cmAbortMsg                    = 52,
  67.     cmReadMsg                    = 100,
  68.     cmWriteMsg                    = 101,
  69.     cmStatusMsg                    = 102,
  70.     cmListenMsg                    = 103,
  71.     cmAcceptMsg                    = 104,
  72.     cmCloseMsg                    = 105,
  73.     cmOpenMsg                    = 106,
  74.     cmBreakMsg                    = 107,
  75.     cmIOKillMsg                    = 108,
  76.     cmEnvironsMsg                = 109,                            /* new connection tool messages for ctb 1.1 */
  77.     cmNewIOPBMsg                = 110,
  78.     cmDisposeIOPBMsg            = 111,
  79.     cmGetErrorStringMsg            = 112,
  80.     cmPBReadMsg                    = 113,
  81.     cmPBWriteMsg                = 114,
  82.     cmPBIOKillMsg                = 115
  83. };
  84.  
  85.  
  86. enum {
  87.                                                                 /*    messages for validate DefProc    */
  88.     cmValidateMsg                = 0,
  89.     cmDefaultMsg                = 1
  90. };
  91.  
  92.  
  93. enum {
  94.                                                                 /*    messages for Setup DefProc    */
  95.     cmSpreflightMsg                = 0,
  96.     cmSsetupMsg                    = 1,
  97.     cmSitemMsg                    = 2,
  98.     cmSfilterMsg                = 3,
  99.     cmScleanupMsg                = 4
  100. };
  101.  
  102.  
  103. enum {
  104.                                                                 /*    messages for scripting defProc    */
  105.     cmMgetMsg                    = 0,
  106.     cmMsetMsg                    = 1
  107. };
  108.  
  109.  
  110. enum {
  111.                                                                 /*    messages for localization defProc    */
  112.     cmL2English                    = 0,
  113.     cmL2Intl                    = 1
  114. };
  115.  
  116.  
  117. enum {
  118.                                                                 /* private data constants */
  119.     cdefType                    = FOUR_CHAR_CODE('cdef'),        /* main connection definition procedure */
  120.     cvalType                    = FOUR_CHAR_CODE('cval'),        /* validation definition procedure */
  121.     csetType                    = FOUR_CHAR_CODE('cset'),        /* connection setup definition procedure */
  122.     clocType                    = FOUR_CHAR_CODE('cloc'),        /* connection configuration localization defProc */
  123.     cscrType                    = FOUR_CHAR_CODE('cscr'),        /* connection scripting defProc interfaces */
  124.     cbndType                    = FOUR_CHAR_CODE('cbnd'),        /* bundle type for connection */
  125.     cverType                    = FOUR_CHAR_CODE('vers')
  126. };
  127.  
  128. struct CMDataBuffer {
  129.     Ptr                             thePtr;
  130.     long                             count;
  131.     CMChannel                         channel;
  132.     CMFlags                         flags;
  133. };
  134. typedef struct CMDataBuffer CMDataBuffer;
  135.  
  136. typedef CMDataBuffer *                    CMDataBufferPtr;
  137. struct CMCompletorRecord {
  138.     Boolean                         async;
  139.     SInt8                             filler;
  140.     ConnectionCompletionUPP         completionRoutine;
  141. };
  142. typedef struct CMCompletorRecord CMCompletorRecord;
  143.  
  144. typedef CMCompletorRecord *                CMCompletorPtr;
  145. /*    Private Data Structure    */
  146. struct CMSetupStruct {
  147.     DialogPtr                         theDialog;
  148.     short                             count;
  149.     Ptr                             theConfig;
  150.     short                             procID;                        /* procID of the tool    */
  151. };
  152. typedef struct CMSetupStruct CMSetupStruct;
  153.  
  154. typedef CMSetupStruct *                    CMSetupPtr;
  155.  
  156. #if PRAGMA_STRUCT_ALIGN
  157.     #pragma options align=reset
  158. #elif PRAGMA_STRUCT_PACKPUSH
  159.     #pragma pack(pop)
  160. #elif PRAGMA_STRUCT_PACK
  161.     #pragma pack()
  162. #endif
  163.  
  164. #ifdef PRAGMA_IMPORT_OFF
  165. #pragma import off
  166. #elif PRAGMA_IMPORT
  167. #pragma import reset
  168. #endif
  169.  
  170. #ifdef __cplusplus
  171. }
  172. #endif
  173.  
  174. #endif /* __CONNECTIONTOOLS__ */
  175.  
  176.